let models = require.context('./models',true,/\.ts$/);

let storeModels = models.keys().reduce((prev:any,cur:string) =>{
    // @ts-ignore
    let name = cur.match(/\.\/(\w+)\.ts$/)[1];
    let key = name.substr(0,1).toUpperCase() + name.substring(1);
    let ClassStore = models(cur).default;
    prev[key] = new ClassStore();
    return prev
},{})

export default storeModels

